// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue';
import App from './App'; // 是由 vue-template-compiler 处理成 Vue-component 对象

Vue.config.productionTip = false;

/* eslint-disable no-new */
/* runtime-compiler */
// template -> ast -> render function -> virtual dom -> ui
new Vue({
  el: '#app',
  components: { App },
  template: '<App/>',
});

/* runtime-only */
// render function -> virtual dom -> ui
/**
 * <ul>
 *   <li>性能更高</li>
 *   <li>依赖的vue代码更少</li>
 * </ul>
 */
new Vue({
  // el: '#app',
  /**
   * h === createElement
   * <ul>
   *   <li>createElement(tagName)</li>
   *   <li>createElement(tagName, {attributeName:attributeValue})</li>
   *   <li>createElement(tagName, {attributeName:attributeValue}, ['中间的结点'])</li>
   *   <li>createElement(component)</li>
   * </ul>
   * @param h
   * @returns {*}
   */
  render: h => h(App)
});
